public class Student {
    // 属性
    private String name;
    private String studentId;
    private String className;
    private String gender;
    private int age;
    private String personality;

    // 构造函数
    public Student(String name, String studentId, String className, String gender, int age, String personality) {
        this.name = name;
        this.studentId = studentId;
        this.className = className;
        this.gender = gender;
        this.age = age;
        this.personality = personality;
    }

    // 获得姓名
    public String getName() {
        return name;
    }

    // 获得学号
    public String getStudentId() {
        return studentId;
    }

    // 获得班级
    public String getClassName() {
        return className;
    }

    // 获得性别
    public String getGender() {
        return gender;
    }

    // 获得年龄
    public int getAge() {
        return age;
    }

    // 获得性格
    public String getPersonality() {
        return personality;
    }

    // 信息概要
    public String infoSummary() {
        return "姓名: " + name + ", 学号: " + studentId + ", 班级: " + className + ", 性别: " + gender + ", 年龄: " + age + ", 性格: " + personality;
    }

    // 主方法，用于测试
    public static void main(String[] args) {
        // 创建三个学生对象
        Student student1 = new Student("张三", "20230001", "计算机科学与技术", "男", 20, "开朗");
        Student student2 = new Student("李四", "20230002", "软件工程", "女", 21, "内向");
        Student student3 = new Student("王五", "20230003", "信息安全", "男", 22, "热情");

        // 输出他们的信息概要
        System.out.println(student1.infoSummary());
        System.out.println(student2.infoSummary());
        System.out.println(student3.infoSummary());
    }
}
